package com.mtsmda.chapter4;

import javax.swing.JButton;

public class OperatorsEx {

	public static void main(String[] args) {
		int x = 15;
		// x *= 2 + 5;//or
		x = x * (2 + 5);
		System.out.println(x);

		JButton button = new JButton("Fisrt");
		JButton button2 = new JButton("Second");
		JButton button3 = button;
		button3.setName("Third");
		System.out.println(button == button2);
		System.out.println(button == button3);
		System.out.println(button.toString().equals(button3.toString()));
		System.out.println(button.getName().equals(button3.getName()));
		
		System.out.println("*****");
		Car bmw = Car.BMW;
		Car opel = bmw;
		System.out.println(bmw == opel);
		System.out.println(bmw.equals(opel));
		
		int g = 19 % 500;
		System.out.println(g);
	}

}

enum Car{
	BMW, MERCEDES, TOYATA, MAZDA, OPEL;
}